<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<s:layout-render name="/newjsp.jsp">
    <s:layout-component name="hlavicka">
        <f:message key="nadpis.orders"/>
    </s:layout-component>
    <s:layout-component name="telo">
        <s:useActionBean beanclass="pneuservis.frontend.web.LoginActionBean" var="actionBean"/>
        <s:form beanclass="pneuservis.frontend.web.LoginActionBean">
            <s:hidden name="orderid"/>
            <fieldset><legend><f:message key="key.zmenaUdajov"/></legend>
                <s:errors/>
                <table>
                    <tr>
                        <th><s:label for="o1" name="order.tyresCount"/></th>
                        <td><s:text id="o1" name="order.tyresCount" formatType="number"/></td>
                    </tr>
                    <tr>
                        <th><s:label for="o2" name="order.vehicleBrand"/></th>
                        <td><s:text id="o2" name="order.vehicleBrand" /></td>
                    </tr>
                    <tr>
                        <th><s:label for="t1" name="tyre.id"/></th>
                        <td><s:select id="t1" name="tyre.id">
                                <c:forEach items="${actionBean.tyres}" var="tyre">
                                    <s:option label="${tyre.manufacturer},${tyre.rimSize}R,${tyre.width},${tyre.profile},${tyre.season}" value="${tyre.id}"/>
                                </c:forEach>
                            </s:select></td>
                    </tr>
                    <tr>
                        <th><s:label for="s1" name="service.id"/></th>
                        <td>
                            <table>
                                <c:forEach items="${actionBean.services}" var="service">
                                    <tr>
                                        <td>
                                            <s:checkbox name="checkedServices" value="${service.id}"/>
                                        </td>
                                        <td>
                                            <s:label name="${service.name}"/>
                                        </td>
                                        <td>
                                            <s:label name="${service.price}"/>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </table>
                        </td>
                    </tr>

                </table>
                <s:submit name="save"><f:message key="key.ulozit" /></s:submit>
                </fieldset>
        </s:form>

    </s:layout-component>
</s:layout-render>
